<div class="tableBox">
    <span id='mention1' class="mentionData">暂无数据</span>
    <table cellspacing="0" cellpadding="0">
        <thead>
            <th width="82px">序号</th>
            <th width="365px">标题</th>
            <th width="190px">发表时间</th>
            <th width="199px">收藏分类</th>
            <th width="100px">操作</th>
        </thead>
        <tbody>
            <script id='mySaveTableData' type="text/html">
            <tr>
                <td data-dbID='{{:#data["dbID"]}}'>{{:#data['num']}}</td>
                <td><p class="title" style="width: 430px;" data-sysId='{{:#data["sysId"]}}' data-detailUrl='{{:#data["detailUrl"]}}' data-ipAddress='{{:#data["ipAddress"]}}'   data-id='{{:#data["sysId"]}}'  data-filename='{{:#data["fileName"]}}'  data-tablename='{{:~tableName(#data,#index)}}' data-title='{{:#data["title"]}}' title="{{:#data['title']}}">{{:#data['title']}}</p></td>
                <td>{{:#data['time']}}</td>
                <td>  
                    <p class="text" style="width: 180px;" title="{{:#data['classifyName']}}">{{:#data['classifyName']}}</p>
                </td> 
                <td>  
                     {{if sysId}}
                    <p><span data-id='{{:#data["sysId"]}}' class="deleteSave" >删除</span></p>
                      {{else}}
                        <p></p>
                     {{/if}}
                     
                </td>
        
            </tr>
            </script>
        </tbody>
    </table>
</div>
<!-- 分页 -->
<div class="pageNation">
    <div id="savePageNation"></div>
</div>
<script>
    $(function () {
        pageData.tableData(config.getCollectionList, postTableData, 'mySaveTableData', 'savePageNation', true, '#mention1', render(), false, callBackPage);
        $('#mySaveTable').click(function (e) {
            if (e.target.className == 'deleteSave') {
                // 获取数据
                var resourceID = $(e.target).parents('tr').children('td').eq(1).children('p').attr('data-id');
                var dbID = $(e.target).parents('tr').children('td').eq(0).attr('data-dbID');
                layer.open({
                    title: '提示',
                    content: '你确定删除此条收藏吗？',
                    time: 0,//不自动关闭
                    btn: ['确定', '取消'],
                    scrollbar: true,
                    yes: function (index) {
                        layer.close(index);
                        //删除该条数据
                        console.log({ collectClassifyID: $(e.target).attr('data-id'), dbID: dbID, resourceID: resourceID })
                        shared.ajaxPost(config.deleteCollection, { sysId: $(e.target).attr('data-id') }, function callback(res) {
                            //    重新獲取數據
                            pageData.tableData(config.getCollectionList, postTableData, 'mySaveTableData', 'savePageNation', true, '#mention1', render(), false, callBackPage);
                            layer.msg(res)
                        })
                    }
                });
            }
        })
        // 跳转到详情页
        pageData.personNalDetail('#mySaveTable')

    })
</script>